import { Component, OnInit , Input } from '@angular/core';

import { NavController } from '@ionic/angular'

import { Router } from '@angular/router'

@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss'],
})
export class HeaderComponent implements OnInit {
  @Input() title: string;
  @Input() right: string;
  @Input() url: string;


  constructor(private nav:NavController,private router:Router) { }

  ngOnInit() {}

  back(){
    this.nav.back();
  }

  next(){
    this.router.navigateByUrl(this.url)
  }

}
